home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Macintosh Demo Applications CD
/
Apple-MacintoshDemoApplicationsCD-1.0-1992.iso
/
More Information
/
QuicKeys
/
For Programmers Only.sea
/
C Examples
/
extensions.h
< prev
next >
Wrap
Text File
|
1991-06-22
|
5KB
|
150 lines
/*************************
$Workfile: extensions.h $
$Revision: 1.1 $
QuicKeys2™ extentions defines
© 1990 CE Software, Inc. All rights reserved.
For QuicKeys 2 Extension Sample source code you have a royalty-free right
to include object code derived from this Sample source code in programs
that you develop. You also have the right to use, distribute, and license
such programs to third parties without payment of any further license fees
to CE Software, Inc., so long as a copyright notice sufficient to protect
your copyright for your software in the United States or any other country;
is included in the graphic display of your software and on the labels
affixed to the media on which your software is distributed.
WHEN WHO WHAT
Checked in by Marsh Gosnell, Wednesday, September 5, 1990 12:37:13 PM
8/18 mkg created file
8/24 mkg added stuff for type of periodic call
8/28 mkg changes for Think C
Checked in by Marsh Gosnell, Thursday, September 6, 1990 4:52:55 PM
9/5 mkg make one version for MPW C++, MPW C, and Think C
9/6 mkg added PublicQK2Globals and QuicKeys 2 driver control calls
•••••
5/29 mkg update for QK version 2.1
•••••
*/
/* resource ID's */
#define UIRsrcID -14348
#define XRsrcID -14347
/* extension data format. followed by user data */
struct ExtensionDataHeader {
unsigned char strTitle[16]; /* title of key. may be modified by user interface routine */
OSType ostCreator; /* creator of keyset. populated by QuicKeys */
short wLength; /* length of keyset including these fields and private data */
};
#ifndef __cplusplus
typedef struct ExtensionDataHeader ExtensionDataHeader;
#endif
/* possible selectors for user interface routine */
#define newUI 0 /* you're being called to create a new extension. */
/* Initialize your private data accordingly */
#define initUI 1 /* Your dialog items have been added to QuicKeys' dialog */
/* Do any setup processing here */
#define hitUI 2 /* The user clicked or typed into one of your dialog items */
#define doneUI 3 /* Clean up your act before the dialog is disposed */
struct ExecuteQueue {
#ifdef __cplusplus
ExecuteQueue* pNext; /* pointer to next queue entry. populated by QuicKeys */
#else
Ptr pNext;
#endif
OSType ostCreator; /* creator of keyset. populated by QuicKeys */
unsigned short flags; /* flags for this executable */
unsigned char strfName[32]; /* your file name. populated by QuicKeys */
char sicn[32]; /* custom SICN you must popupate if you have one */
long lRefCon; /* for your use */
};
#ifndef __cplusplus
typedef struct ExecuteQueue ExecuteQueue;
#endif
/* bits in flags. all other bits are reserved and should be zero. */
#define PeriodicFlag 0x0001 /* your routine will be run every GetNextEvent, */
/* EventAvail, or SystemTask call */
#define AbortFlag 0x0002 /* set if you need to be told to stop what you're doing */
#define DontLoadFlag 0x8000 /* set if you don't want to be loaded */
/* possible selectors for execute routine */
#define initX -1 /* your have just been loaded. Your resource file is still open */
#define regularX 0 /* execute your key. */
#define periodicX 1 /* PeriodicFlag is set and it's SystemTask, GetNextEvent,
/* or EventAvail time */
#define abortX 2 /* QK is aborting/cancelling what it's doing and you have AbortFlag */
/* set. You may NOT do things that might move memory */
/* possible types of periodic calls */
#define periodicDoRun 0 /* SystemTask and anytime QK2 driver gets a DoRun */
#define periodicGNE 1 /* GetNextEvent */
#define periodicEAvail 2 /* EventAvail */
/* QuicKeys 2™ globals available for your use */
struct PublicQK2Globals {
char private1[524];
short wDestVol; /* System folder volume */
long lDestDirID; /* System folder dirID */
long lPrefsDir; /* Preferences folder dirID */
long lQKDir; /* QuicKeys folder dirID */
long lKeySetDir; /* KeySet folder dirID */
long lMacroDir; /* Macros folder dirID */
long lSeqDir; /* Sequences folder dirID */
long lExtDir; /* Extensions folder dirID */
long lClipDir; /* Clipboards folder dirID */
char private3[70];
ExecuteQueue* pExtensions; /* queue of externals loaded in at boot time */
char private4[1338];
short wCurKeyType; /* type of the key in ucaCurKey */
char ucaCurKey[2048]; /* This is a key being executed */
Str255 strTypeString; /* put a string here for QK2 to type. */
/* make sure that strTypeString[0] == 0 before you do. */
};
#ifndef __cplusplus
typedef struct PublicQK2Globals PublicQK2Globals;
#endif
/* QuicKeys 2™ driver name */
#define QuicKeysDriverName "\p.Quickeys"
/* QuicKeys 2™ driver control calls */
#define QK2GetGlobals 8
#define QK2PlayByName 17
#define QK2PlayByPtr 18
#define QK2GetStatus 19
#define QK2Kill 20
#define QK2OnOff 21
#define QK2Pause 23
#define QK2GetPosition 24
#define QK2SetPosition 25
#define QK2GetVersion 26
/* possible QuicKeys 2™ status */
#define QK2IsDisabled -1
#define QK2InUserInterface -2
#define QK2BusyNotPlaying -3
#define QK2IsIdle 0
#define QK2InPlayFast 1
#define QK2InPlayFastPaused 2
#define QK2InRecordFast 3
#define QK2InRecordFastPaused 4
#define QK2InPlayRT 5
#define QK2InPlayRTPaused 6
#define QK2InRecordRT 7
#define QK2InRecordRTPaused 8